package usersObjects;

import questionsObjects.QuestionHistories;
import questionsObjects.QuestionHistory;
import serializableObjects.SerializableMethods;
import serializableObjects.SerializableUser;

/**
 * Created by root on 12/8/13.
 */
public class UserHistory implements UserBehavior{
    private final String descriptionBehavior = "To View histories of user";

    @Override
    public String getDescriptionBehavior() {
        return descriptionBehavior;
    }

    @Override
    public boolean executeBehavior(StorageOfUsers currentStorageOfUser, UserCertificate currentUserCertificate) {
        QuestionHistories questionHistories;
        questionHistories = currentStorageOfUser.getQuestionHistories(currentUserCertificate);
        for(QuestionHistory s : questionHistories) {
            System.out.println(s.getIndexes());
            System.out.println(s.getRights());
        }
        return false;
    }
}
